package com.example.eschool.son_fragment_person;

import android.content.Intent;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;

import com.example.eschool.R;
import com.example.eschool.SonActivity;


public class InvestFragment extends Fragment implements View.OnClickListener{
    View rootview;
    Button btn_cancel_desk;
    public InvestFragment() {

    }


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        btn_cancel_desk = rootview.findViewById(R.id.btn_cancel_desk);
        btn_cancel_desk.setOnClickListener(this);

    }
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        if (rootview == null){
            rootview=inflater.inflate(R.layout.son_fragment_invest, container, false);
        }

        return rootview;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_cancel_desk:
                Intent intent = new Intent(getActivity(), SonActivity.class);
                intent.putExtra("fragment", "cashierdesk");
                intent.putExtra("title", "收银台");
                startActivity(intent);
                break;
        }
    }


}